#ifndef _QUEUE_H_
#define _QUEUE_H_

#include "list.h"
#include "locker.h"
#include <stdint.h>

#ifdef __cplusplus
extern "C"{
#endif

typedef struct queue queue_t;


queue_t *queue_create(locker_t *locker);
void queue_destroy(queue_t **p_self, dl_list_item_destroy_func destroy);
int queue_in(queue_t *self, struct dl_list *item);
struct dl_list *queue_out(queue_t *self);
uint32_t queue_item_nums(queue_t *self);

#ifdef __cplusplus
}
#endif


#endif
